package cn.controller;

import cn.util.aop.Authority;
import common.service.MryeDataCenterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;


@Controller
public class AopController {
    private Logger logger=LoggerFactory.getLogger(AopController.class);


    @Resource(name="mryeDataCenterService")
    MryeDataCenterService mryeDataCenterService;

    @RequestMapping("body.html")
    @Authority()
    public String body(@RequestBody String json, HttpServletRequest request, Model model) throws Exception {
        logger.info("���ʵ�ַ===;���ʲ���==="+json);
        Map<String,Object> map=new HashMap<>();
       // map.put("sql","select * from yst where id=#{id}");
       // map.put("id",1);
        //Map<String,Object> map=JacksonUtil.parseJson(json);
        //HttpSession session= request.getSession();
        //System.out.println("SessionID:"+request.getSession().getId()+"IP:"+request.getRemoteAddr());
        //System.out.println("֮���ֵ:"+map.get("id"));
        //model.addAttribute("map",mryeDataCenterService.searchSapList(map));
        return "body";
    }

}
